<?php

namespace app\model;

use app\utils\CashMoneyEmun;
use think\model\concern\SoftDelete;
class CashMoney extends BaseModel
{
    use SoftDelete;
    protected $deleteTime = 'delete_at';
    protected $table = 'cash_money';

    public function getStatusTextAttr($value, $data){
        return CashMoneyEmun::cashMoneyStatusText($data['status']);
    }

    public function member(){
        return $this->belongsTo(Member::class, 'member_id', 'id');
    }
}
